<script type="text/javascript">
$(document).ready(function(){
    var profileOptions = {
       dataType: "json",    
       success: function(data) { 
            if (data.error == false) {
                // TODO aggiungere il trigger per aggiornare la lista cateorie
                jQuery.facebox("<?= $this->translate('okMsg') ?>");
            } else {
                jQuery.facebox(parseJsonValidation(data.messages));
            } 
        },
       error:   function (xhr, ajaxOptions, thrownError) {
            jQuery.facebox("<?= $this->translate('ajaxError') ?>");
       }
    };

    $('#formcategory').ajaxForm(profileOptions);
});
</script>
<form id="<?= $this->escape($this->formCategory->getAttrib("id"))?>"
      class="<?= $this->escape($this->formCategory->getAttrib("class"))?>" 
      action="/category/updatecategory" 
      method="<?= $this->escape($this->formCategory->getMethod())?>">
      <ul>
          <li id="mod" class="element-group">
            <?= $this->formCategory->name ?>
            <span class="hint"><?= $this->translate('nameFeedBox')?></span>      
          </li>
          <li id="mod" class="element-group">
            <?= $this->formCategory->description ?>
            <span class="hint"><?= $this->translate('descriptionFeed')?></span>   
          </li>
          <li id="mod" class="element-group">
            <?= $this->formCategory->save ?>    
          </li>
      </ul>
</form>      